package beanstao.util.type.base;

import java.sql.Timestamp;
import java.text.ParseException;

import beanstao.util.Util;


public class String2Timestamp extends DateTimeCastor<String, Timestamp>
{

	@Override
	public Timestamp cast(String src, Class<?> toType, String... args)
	{
		try
		{
			return new java.sql.Timestamp(dateTimeFormat.parse(src).getTime());
		}
		catch (ParseException e)
		{
			throw Util.wrapThrow(e);
		}
	}

}
